// delegate_test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "delegate.h"

using namespace delegates;

class TestClass
{
public:
	int ClassTestFunc()
	{
		return 3010;
	}
};

int TestFunc()
{
	return 4992;
}

int _tmain(int argc, _TCHAR* argv[])
{
	TestClass c;
	CDelegate0<int> func;
	func = newDelegate(TestFunc);
	printf("invoke static func output: %d", func());
	func = newDelegate(&c, &TestClass::ClassTestFunc);
	printf("invoke class func output: %d", func());

	return 0;
}

